<?php
class TipoEvento extends AppModel {
	var $name = 'TipoEvento';
	var $useTable = 'tipos_eventos';
	var $displayField = 'descripcion';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'descripcion' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '100')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		)
	);
	
	var $hasMany = array(
		'SolicitudEvento' => array(
			'className' => 'SolicitudEvento',
			'foreignKey' => 'tipo_evento_id'
		)
	);
}
?>